package org.itboys.core.entity.mysql.tray;

import lombok.Data;
import org.itboys.mysql.entity.BaseMySqlEntity;

/**
 * 作者：zzq
 * 时间：2018/11/30
 * 描述：托盘
 */
@Data
public class SundayTray extends BaseMySqlEntity {
    private Long modelId;//模板id
    private Long ownerId;//持有供应商id
    private Long serviceId;//服务供应商id
    private Long storeId;//仓库ID
    private Long applyId;//申请id
    private String ewm;//二维码路径
    private Integer status;//1,正常 2，
    private Integer time;//使用次数

    public SundayTray() {
    }

    public SundayTray(Long modelId, Long ownerId, Long serviceId, Long storeId, Long applyId, String ewm, Integer status) {
        this.modelId = modelId;
        this.ownerId = ownerId;
        this.serviceId = serviceId;
        this.storeId = storeId;
        this.applyId = applyId;
        this.ewm = ewm;
        this.status = status;
    }

    public String getStatusStr() {
        String statusStr="";
        if(status==null)return statusStr;

        switch (status) {
            case 0:
                statusStr="待分配";
                break;
            case 1:
                statusStr="待租赁";
                break;
            case 2:
                statusStr="租赁中";
                break;
            case 3:
                statusStr="已下架";
                break;
            case 4:
                statusStr="已损坏";
                break;
            case 5:
                statusStr="已买断";
                break;
            default:
                break;
        }
        return statusStr;
    }
}
